import { defineConfig } from "vite";
import uni from "@dcloudio/vite-plugin-uni";

console.log("process.env.BUILD_MODE", process.env.BUILD_MODE);

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [uni()],
  // base: process.env.BUILD_MODE === 'test' ? "test" : "/",
  build: {
    assetsDir: process.env.BUILD_MODE === 'test' ? "testAssets" : "assets",
  },
  server: {
    proxy: {
      "/dev-api": "http://localhost:3000",
      "/journal_img": "http://localhost:3000",
    }
  }
});
